package cn.com.huzo.model.entities.master;

import huzofw.model.entities.BaseEntity;
import huzofw.model.entities.IAggregateRoot;
import java.io.Serializable;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * 主产品计划项目权限实体类
 *
 * @author 吴旭
 */
public class MpsItemUsageRuleEntity extends BaseEntity implements Serializable, IAggregateRoot {

    private static final long serialVersionUID = 4885925998839657254L;
    private String RuleId;
    private Long ItemId;
    private Long UserId;

    public String getRuleId() {
        return RuleId;
    }

    public void setRuleId(String RuleId) {
        this.RuleId = RuleId;
    }

    public Long getItemId() {
        return ItemId;
    }

    public void setItemId(Long ItemId) {
        this.ItemId = ItemId;
    }

    public Long getUserId() {
        return UserId;
    }

    public void setUserId(Long UserId) {
        this.UserId = UserId;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof MpsItemUsageRuleEntity)) {
            return false;
        }

        final MpsItemUsageRuleEntity that = (MpsItemUsageRuleEntity) o;

        return new EqualsBuilder()
                .append(this.getRuleId(), that.getRuleId())
                .isEquals();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + this.getRuleId().hashCode();

        return result;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
